﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class StoryManager : PersistentSingleton<StoryManager>
{
    [SerializeField] StoryPlay storyPlay;

    Story story;


    /****播放状态****/
    bool playing;


    void Start()
    {
        playing = false;
    }
    //剧情播放状态初始化
    public void StoryPlaying(int id_story)
    {
        if (id_story == -1)
        {
            storyPlay.gameObject.SetActive(false);
            return;
        }
        
        story = StoryDataManager.Instance.GetStoryById(id_story);         //从StoryDataManager类获得对应id的剧情
        playing = true;
        storyPlay.Instantiate(story);                                      //使用storyplay类进行初始化
    }



}
